<?php

namespace app\index\controller;

use think\Controller;
use think\View;

class Article extends Common
{

//    跳到文章页
    public function index($id)
    {

//        dump($id);die;

//        让他的观看数加1

        $res = db('article')->where('id',$id)->find();
//        dump($res);die;

        $this->assign(array(
            'res'=>$res,
        ));
        return view('article');
    }



}
